An electronic device is provided with various ports providing access for transmitting data or functions. Contaminants often get into the electronic device through the ports, which can result in damage to electronic components of the electronic devices. Traditionally, a waterproof structure is utilized to seal the ports of the electronic devices, but the traditional waterproof structures can come loose and slide out of the port.